package com.ruoyi.web.core.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.ruoyi.web.interceptor.AppInterceptor;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer{

    @Autowired
    private AppInterceptor appInterceptor;

    /**
     * 自定义拦截规则
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry)
    {
        registry.addInterceptor(appInterceptor).addPathPatterns("/app/**");
    }

}
